/*
 * @description: 
 * @Date: 2022-10-17 17:19:38
 * @LastEditTime: 2022-12-10 14:37:10
 */
import emitter from "./emitter"
import store from "./store";
const ComponentRouter = {
  "tab://setting": () => {
    //设置组件
    emitter.emit("openController")
  },
  "tab://noteWindow": (event = {}) => {
    //备忘录编辑组件
    event.component = 'noteWindow'
    emitter.emit("openPlugin", event)
  },
  "tab://weatherWindow": (event = {}) => {
    //备忘录编辑组件
    event.full = false;
    event.size = {
      width: '305px',
      height: '520px'
    }
    event.component = 'weatherWindow'
    emitter.emit("openPlugin", event)
  },
  "tab://hotSearchWindow": (event = {}) => {
    //热搜榜
    event.component = 'hotSearchWindow'
    emitter.emit("openPlugin", event)
  },
  "tab://addicon": (event = {}) => {
    event.full = false;
    event.size = {
      width: '900px',
      height: '500px'
    }
    event.component = 'addicon'
    emitter.emit("openPlugin", event)
  },
  "tab://editAll": (event = {}) => {
    setTimeout(() => {
      store.state.editStatus = true
    }, 100);
  }
}
export default ComponentRouter